#include "UdpServer.hpp"
#include <memory>

void Usage(std::string proc)//使用手册
{
    std::cout << "Usage: " << proc << " serverip serverport" << std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(1);
    }

    // std::string ip = argv[1];
    uint16_t port = std::stoi(argv[1]);
    
    Console();
    std::unique_ptr<UdpServer> us = std::make_unique<UdpServer>(port);
    us->Init();
    us->Start();
    return 0;
}